//
//  HomeRepaymentTableCell.m
//  DanaKreditLoan
//
//  Created by ZhengChengFeng on 2024/10/19.
//

#import "HomeRepaymentTableCell.h"

@implementation HomeRepaymentTableCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.backgroundColor = [UIColor clearColor];
        
        self.backView = [[UIView alloc] initWithFrame:CGRectMake(15, 0, kScreenWidth - 30, 60)];
        self.backView.backgroundColor = [UIColor whiteColor];
        [self.contentView addSubview:self.backView];
        self.backView.layer.cornerRadius = 14;
        self.backView.layer.masksToBounds = YES;
        
        self.bannerView = [[BannerRepayView alloc] initWithFrame:CGRectMake(15, 10, kScreenWidth  - 30 - 30, 40)];
        self.bannerView.backgroundColor = [UIColor clearColor];
        [self.backView addSubview:self.bannerView];
        
    }
    return self;
}

- (void)reloadData:(NSArray *)dataSource{
    kWeakSelf
    self.bannerView.bannerList = dataSource;
    
    self.bannerView.getBannerUrlString = ^(NSString * _Nonnull urlStr) {
        if (weakSelf.callBackBannerReplyBlock) {
            weakSelf.callBackBannerReplyBlock(urlStr);
        }
    };
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}



@end
